#pragma once
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>
#include <time.h>

typedef int Heaptype;
typedef struct Heap
{
	Heaptype* data;
	int size;
	int capacity;
}Heap;

void HeapInit(Heap* php);
void HeapDestroy(Heap* php);
void HeapPush(Heap* php, Heaptype num);
void Ajustup(Heaptype* a, int child);
void Swap(Heaptype* p1, Heaptype* p2);
void AjustDown(Heaptype* a, int n, int parent);
void HeapPop(Heap* php);
Heaptype HeapTop(Heap* php);
void HeapPrint(Heaptype* arr, int size);
void HeapSort(Heaptype* arr, int size);
void HeapSize(Heap* php);
void HeapEmpty(Heap* php);
void CreateNDate();
void PrintTopK(int k);